import request from '@/utils/request'

export default {
  getAllStudent(searchModel){  //获取列表中学生信息 以及搜索学生信息
    return request({
      url: `/system/score/${searchModel.pageNo}/${searchModel.pageSize}`,
      method: 'get',
      params:{
        clazzName: searchModel.clazz,
        name: searchModel.name,
      }
    });
  },
  addStudent(student){  //添加学生用户
    return request({
      url: "/system/score/addOrUpdateStudentScore",
      method: 'post',
      data: student
    });
  },
  getById(uid){    // 通过学生id 进行回显
    return request({
      url: `/system/score/${uid}`,
      method: 'get',
    });
  },
  deleteById(id){  // 通过id 删除学生信息
    return request({
      url: `/system/score/del/${id}`,
      method: 'delete',
      // data: student
    });
  },  

  getnumList(uid) {
    return request({
      url: `system/score/score/${uid}`,
      method: 'get',
    });
  },
  getscore(clazz) {
    return request({
      url: `system/score/getMaxNumAs/${clazz}`,
      method: 'get',
    });
  },


}